import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description:斐波那契数(迭代实现)
 * User: zjc
 * Date: 2022-05-07
 * Time: 22:58
 */
public class Project {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int a1 = 1;
        int a2 = 1;
        int sum = 0;
        for (int i = 3; i <= n; i++) {
            sum = a1 + a2;
            a1 = a2;
            a2 = sum;
        }
        if(n == 1){
            System.out.println(a1);
        }else if(n == 2){
            System.out.println(a2);
        }else{
            System.out.println(sum);
        }
    }
}
